Ubuntu CUDA 驱动升级失败的问题
升级时失败
1sudo apt update
2sudo apt upgrade错误信息:
1$ sudo apt --fix-broken install
2Reading package lists... Done
3Building dependency tree... Done
4Reading state information... Done
5Correcting dependencies... Done
6The following package was automatically installed and is no longer required:
7 nvidia-firmware-535-535.129.03
8Use 'sudo apt autoremove' to remove it.
9The following additional packages will be installed:
10 nvidia-kernel-common-535
11The following packages will be upgraded:
12 nvidia-kernel-common-535
131 upgraded, 0 newly installed, 0 to remove and 32 not upgraded.
141 not fully installed or removed.
15Need to get 0 B/38,3 MB of archives.
16After this operation, 61,2 MB of additional disk space will be used.
17Do you want to continue? [Y/n] y
18(Reading database ... 291692 files and directories currently installed.)
19Preparing to unpack .../nvidia-kernel-common-535_535.129.03-0ubuntu1_amd64.deb .
20..
21Unpacking nvidia-kernel-common-535 (535.129.03-0ubuntu1) over (535.129.03-0ubunt
22u0.22.04.1) ...
23dpkg: error processing archive /var/cache/apt/archives/nvidia-kernel-common-535_
24535.129.03-0ubuntu1_amd64.deb (--unpack):
25 trying to overwrite '/lib/firmware/nvidia/535.129.03/gsp_ga10x.bin', which is a
26lso in package nvidia-firmware-535-535.129.03 535.129.03-0ubuntu0.22.04.1
27dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
28Errors were encountered while processing:
29 /var/cache/apt/archives/nvidia-kernel-common-535_535.129.03-0ubuntu1_amd64.deb
30E: Sub-process /usr/bin/dpkg returned an error code (1)从错误信息上看,应该是 nvidia-kernel-common-535 和 nvidia-firmware-535-535.129.03 两个包
都包含了 /lib/firmware/nvidia/535.129.03/gsp_ga10x.bin 这个文件。
解决办法:
只需要指定使用其中一个包的该文件即可
1sudo dpkg -i --force-overwrite /var/cache/apt/archives/nvidia-kernel-common-535_535.129.03-0ubuntu1_amd64.deb